Skip to content

fix Google Workspace connection probes - #1704

Open
erichanwang wants to merge 1 commit into
rocketride-org:developfrom
erichanwang:fix/google-workspace-connection-probes
Open

fix Google Workspace connection probes#1704
erichanwang wants to merge 1 commit into
rocketride-org:developfrom
erichanwang:fix/google-workspace-connection-probes

Conversation

@erichanwang

@erichanwang erichanwang commented Jul 28, 2026

Copy link
Copy Markdown

fixes #1694

changes

  • add live connection probes for Google Workspace Gmail and Drive nodes
  • keep existing missing-scope diagnostics in the shared connection checker
  • use the Gmail settings API for settings-tier Gmail probes

verification

  • PYTHONPATH=nodes/src:nodes/test:packages/server/engine-lib/rocketlib-python/lib /home/ericwang/Projects/upstream-contributions/rocketride-issue1638/.venv/bin/python -m pytest nodes/test/tool_google_workspace/gmail/test_gmail.py nodes/test/tool_google_workspace/drive/test_drive.py -q
  • PYTHONPATH=nodes/src:nodes/test:packages/server/engine-lib/rocketlib-python/lib /home/ericwang/Projects/upstream-contributions/rocketride-issue1638/.venv/bin/python -m pytest nodes/test/tool_google_workspace/gmail/test_gmail.py -q
  • /home/ericwang/Projects/upstream-contributions/rocketride-issue1638/.venv/bin/python -m ruff check nodes/src/nodes/tool_google_workspace/drive/IInstance.py nodes/src/nodes/tool_google_workspace/gmail/IInstance.py nodes/test/tool_google_workspace/drive/test_drive.py nodes/test/tool_google_workspace/gmail/test_gmail.py
  • /home/ericwang/Projects/upstream-contributions/rocketride-issue1638/.venv/bin/python -m ruff format --check nodes/src/nodes/tool_google_workspace/drive/IInstance.py nodes/src/nodes/tool_google_workspace/gmail/IInstance.py nodes/test/tool_google_workspace/drive/test_drive.py nodes/test/tool_google_workspace/gmail/test_gmail.py
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@erichanwang, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: be58e291-7e5a-4f54-b390-f37254690c83

📥 Commits

Reviewing files that changed from the base of the PR and between 8dbbc12 and 8f1b1c7.

📒 Files selected for processing (4)
  • nodes/src/nodes/tool_google_workspace/drive/IInstance.py
  • nodes/src/nodes/tool_google_workspace/gmail/IInstance.py
  • nodes/test/tool_google_workspace/drive/test_drive.py
  • nodes/test/tool_google_workspace/gmail/test_gmail.py
📝 Walkthrough

Walkthrough

Drive and Gmail check_connection now perform explicit Google API probes, report probe failures as unsuccessful connections, and update tests to cover successful and failing probe behavior.

Changes

Google Workspace connection probes

Layer / File(s) Summary
Service-specific probe wiring
nodes/src/nodes/tool_google_workspace/drive/IInstance.py, nodes/src/nodes/tool_google_workspace/gmail/IInstance.py
Drive uses about().get(fields='user'); Gmail uses users().getProfile(userId=USER_ID). Both descriptions state that connection_ok requires probe success and required scopes.
Probe failure validation
nodes/test/tool_google_workspace/drive/test_drive.py, nodes/test/tool_google_workspace/gmail/test_gmail.py
Test doubles and diagnostics tests cover successful probes and API failures, including propagated error messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant check_connection
  participant _check_connection_impl
  participant GoogleWorkspaceAPI
  check_connection->>_check_connection_impl: pass Drive or Gmail probe
  _check_connection_impl->>GoogleWorkspaceAPI: execute service API request
  GoogleWorkspaceAPI-->>_check_connection_impl: result or exception
  _check_connection_impl-->>check_connection: connection_ok and error diagnostics
Loading

Possibly related PRs

Suggested reviewers: jmaionchi, rod-christensen, stepmikhaylov

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR adds real Gmail and Drive API probes, keeps Calendar's existing probe, and adds failure tests, addressing #1694's misleading connection status.
Out of Scope Changes check ✅ Passed The changes stay focused on Google Workspace probe behavior and related tests, with no clear unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating Google Workspace connection probes.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the module:nodes Python pipeline nodes label Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@erichanwang
erichanwang force-pushed the fix/google-workspace-connection-probes branch from 4891ae7 to 8dbbc12 Compare July 30, 2026 20:39
@erichanwang
erichanwang marked this pull request as ready for review July 30, 2026 20:39
@erichanwang

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@nodes/src/nodes/tool_google_workspace/gmail/IInstance.py`:
- Around line 143-149: The check_connection method currently probes
users.getProfile for every Gmail access tier, which is incompatible with the
settings tier. Update the tier-specific connection logic used by
_check_connection_impl so each configured tier uses an API operation valid for
its required scopes, including a settings-scoped probe for gmail.settings.basic;
preserve missingScopes validation and add a regression test covering a
settings-only configuration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 63a8f450-f55a-4fe7-a5bd-df08296f6749

📥 Commits

Reviewing files that changed from the base of the PR and between baea4ab and 8dbbc12.

📒 Files selected for processing (4)
  • nodes/src/nodes/tool_google_workspace/drive/IInstance.py
  • nodes/src/nodes/tool_google_workspace/gmail/IInstance.py
  • nodes/test/tool_google_workspace/drive/test_drive.py
  • nodes/test/tool_google_workspace/gmail/test_gmail.py

Comment thread nodes/src/nodes/tool_google_workspace/gmail/IInstance.py Outdated
@erichanwang
erichanwang force-pushed the fix/google-workspace-connection-probes branch from 8dbbc12 to 8f1b1c7 Compare July 30, 2026 20:49
@erichanwang

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:nodes Python pipeline nodes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tool_google_workspace: connection_ok reports true when the Google API is disabled

1 participant